package com.javaapi.encrypt;

import com.sun.syndication.io.impl.Base64;

public class Encrypt {

	public static void main(String[] args) {
		System.out.println(encodeStr("str1"));
		System.out.println(decodeStr(encodeStr("str1")));
	}

	public static String encodeStr(String str) {
		Base64 base64 = new Base64();
		String s = base64.encode(str);
		return s;
	}

	public static String decodeStr(String str) {
		Base64 base64 = new Base64();
		String s = base64.decode(str);
		return s;
	}

}
